
#ifndef Velyn_Point2_h
#define Velyn_Point2_h

namespace Velyn {
    
    namespace Object {

        /*
         * Specifies a point2 for a vertex.
         *
         * @author n7down
         */
        class Point2 {
            
        public:
            
            union {
                float _v[2];
                struct {
                    float x, y;
                };
                struct {
                    float u, v;
                };
            };
            
            void set(const float u, const float v) {
                _v[0] = u; _v[1] = v;
            }
            
            void set(const Point2 p) {
                _v[0] = p._v[0]; _v[1] = p._v[1];
            }
            
            const float* get() const {
                return _v;
            }
            
            void print() {
                std::cout << "[ " << _v[0] << " " << _v[1] << " ]\n";
            }
        };
    }
}

#endif
